﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DryWCS.Model.WMS
{
    [SugarTable("SYS_COMMANDS")]
    public class WMSCommandModel
    {
        /// <summary>
        /// 任务ID
        /// </summary>
        [SugarColumn(IsPrimaryKey = true)]
        public int ID { get; set; }

        public int PARENT_ID { get; set; }

        /// <summary>
        /// 组织ID
        /// </summary>
        public int ORG_ID { get; set; }

        /// <summary>
        /// 组织编码
        /// </summary>
        public string ORG_CODE { get; set; }

        /// <summary>
        /// 仓库ID
        /// </summary>
        public int ZONE_ID { get; set; }

        /// <summary>
        /// 仓库编码
        /// </summary>
        public string ZONE_CODE { get; set; }

        /// <summary>
        /// 指令类型ID
        /// </summary>
        public int COMMANDS_TYPE_ID { get; set; }

        /// <summary>
        /// 指令类型编码
        /// </summary>
        public string COMMANDS_TYPE_CODE { get; set; }

        /// <summary>
        /// 指令序号
        /// </summary>
        public int COMMANDS_SEQ { get; set; }

        /// <summary>
        /// WCS指令类型(1：入库，2：出库，4：盘拣，9：移动)
        /// </summary>
        public int COMMANDS_TYPE_WCS { get; set; }

        /// <summary>
        /// 关系ID
        /// </summary>
        public int RELATIONS_ID { get; set; }

        /// <summary>
        /// 托盘ID
        /// </summary>
        public int TRAY_ID { get; set; }

        /// <summary>
        /// 托盘号
        /// </summary>
        public string TRAY_NO { get; set; }

        /// <summary>
        /// 起始设备ID
        /// </summary>
        public int START_EID { get; set; }

        /// <summary>
        /// 起始设备号
        /// </summary>
        public int START_EQ_NO { get; set; }

        /// <summary>
        /// 起始货位ID
        /// </summary>
        public int START_POS_ID { get; set; }

        /// <summary>
        /// 起始货位编码
        /// </summary>
        public string START_POS_CODE { get; set; }

        /// <summary>
        /// 起始货位巷道
        /// </summary>
        public int START_POS_LANE { get; set; }

        /// <summary>
        /// 起始排
        /// </summary>
        public int START_POS_LINE { get; set; }

        /// <summary>
        /// 起始层
        /// </summary>
        public int START_POS_LAYER { get; set; }

        /// <summary>
        /// 起始列
        /// </summary>
        public int START_POS_COL { get; set; }

        /// <summary>
        /// 中转设备ID
        /// </summary>
        public int TRA_EID { get; set; }

        /// <summary>
        /// 中转设备号
        /// </summary>
        public int TRA_EQ_NO { get; set; }

        /// <summary>
        /// 中转设备排
        /// </summary>
        public int TRA_LINE { get; set; }

        /// <summary>
        /// 中转设备列
        /// </summary>
        public int TRA_COL { get; set; }

        /// <summary>
        /// 中转设备到达时间
        /// </summary>
        public DateTime TRA_TIME { get; set; }

        /// <summary>
        /// 当前设备号
        /// </summary>
        public int CUR_EQ_NO { get; set; }

        /// <summary>
        /// 当前排
        /// </summary>
        public int CUR_LINE { get; set; }

        /// <summary>
        /// 当前列
        /// </summary>
        public int CUR_COL { get; set; }


        /// <summary>
        /// 终点设备ID
        /// </summary>
        public int END_EID { get; set; }

        /// <summary>
        /// 终点设备号
        /// </summary>
        public int END_EQ_NO { get; set; }

        /// <summary>
        /// 终点货位ID
        /// </summary>
        public int END_POS_ID { get; set; }

        /// <summary>
        /// 终点货位编码
        /// </summary>
        public string END_POS_CODE { get; set; }

        /// <summary>
        /// 终点货位巷道
        /// </summary>
        public int END_POS_LANE { get; set; }

        /// <summary>
        /// 终点排
        /// </summary>
        public int END_POS_LINE { get; set; }

        /// <summary>
        /// 终点层
        /// </summary>
        public int END_POS_LAYER { get; set; }

        /// <summary>
        /// 终点列
        /// </summary>
        public int END_POS_COL { get; set; }

        /// <summary>
        /// 指令开始时间
        /// </summary>
        public DateTime START_RUN_TIME { get; set; }

        /// <summary>
        /// 指令结束时间
        /// </summary>
        public DateTime END_RUN_TIME { get; set; }

        /// <summary>
        /// 指令状态
        /// </summary>
        public string STATUS_CODE { get; set; }

        /// <summary>
        /// WCS指令状态
        /// </summary>
        public int STATUS_CODE_WCS { get; set; }

        /// <summary>
        /// 是否需要过账
        /// </summary>
        public string IS_POA { get; set; }

        /// <summary>
        /// 指令状态 0-未下发 1-已经下发 重新下发置0 
        /// </summary>
        public int WRITE_TO_PLC { get; set; }

        /// <summary>
        /// AGV任务ID
        /// </summary>
        public int AGV_TASK_ID { get; set; }

        public string ATTRIBUTE1 { get; set; }
        public string ATTRIBUTE2 { get; set; }
        public string ATTRIBUTE3 { get; set; }
        public string ATTRIBUTE4 { get; set; }
        public string ATTRIBUTE5 { get; set; }
        public string ATTRIBUTE6 { get; set; }
        public string ATTRIBUTE7 { get; set; }
        public string ATTRIBUTE8 { get; set; }
        public string ATTRIBUTE9 { get; set; }
        public string ATTRIBUTE10 { get; set; }

        public int VERSION { get; set; }

        public int INSERT_ID { get; set; }
        public string INSERT_NAME { get; set; }
        public DateTime INSERT_TIME { get; set; }
        public int UPDATE_ID { get; set; }
        public string UPDATE_NAME { get; set; }
        public DateTime UPDATE_TIME { get; set; }

        /// <summary>
        /// 穿梭车中转开始设备ID
        /// </summary>
        public int SHU_START_EID { get; set; }

        /// <summary>
        /// 穿梭车中转开始设备号
        /// </summary>
        public int SHU_START_EQ_NO { get; set; }

        /// <summary>
        /// 穿梭车中转开始设备排
        /// </summary>
        public int SHU_START_LINE { get; set; }

        /// <summary>
        /// 穿梭车中转开始设备列
        /// </summary>
        public int SHU_START_COL { get; set; }

        /// <summary>
        /// 穿梭车中转终点设备ID
        /// </summary>
        public int SHU_END_EID { get; set; }

        /// <summary>
        /// 穿梭车中转终点设备号
        /// </summary>
        public int SHU_END_EQ_NO { get; set; }

        /// <summary>
        /// 穿梭车中转终点设备排
        /// </summary>
        public int SHU_END_LINE { get; set; }

        /// <summary>
        /// 穿梭车中转终点设备列
        /// </summary>
        public int SHU_END_COL { get; set; }

        /// <summary>
        /// WCS穿梭车指令状态
        /// </summary>
        public int SHU_STATUS_CODE_WCS { get; set; }

        public int SHU_WRITE_TO_PLC { get; set; }


    }
}
